package com.mlethe.android.demo.banner;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import androidx.appcompat.app.AppCompatActivity;

import com.mlethe.android.demo.R;

public class MainBannerActivity extends AppCompatActivity implements View.OnClickListener {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_banner_main);
        findViewById(R.id.activity_btn).setOnClickListener(this);
        findViewById(R.id.fragment_btn).setOnClickListener(this);
    }

    @Override
    public void onClick(View view) {
        int id = view.getId();
        if (id == R.id.activity_btn) {
            Intent intent = new Intent(this, TestActivity.class);
            startActivity(intent);
        } else if (id == R.id.fragment_btn) {
            Intent intent = new Intent(this, FragmentActivity.class);
            startActivity(intent);
        }
    }
}
